package com.getword.mongodao;

import com.getword.domain.Article;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.Date;
import java.util.List;

public interface ArticleRepository extends MongoRepository<Article, String>, ArticleOperations {

    Article findArticleById(String id);

//    Page<Article> findByTitleLikeOrSentiment(String title, String keyword, Pageable pageable);

    Long countArticlesByReleaseTimeGreaterThan(Date date);

    Long countArticlesByReleaseTimeBetween(Date from, Date to);
}
